/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controlador;
import accesoDatos.*;
import logica.*;
/**
 *
 * @author user
 */
public class ControladorAdmin {
    
    DAOAdmin daoAdmin;
    
    public ControladorAdmin(){
        daoAdmin = new DAOAdmin();
    }
    
    public String insertarAdministrador(String id, String nombre,String user,String pass){
        
        Admin admin = new Admin(id, nombre,user,pass);
        
        int x = daoAdmin.guardarAdmin(admin);
        if(x==1) return "Se inserto la administrador";
        
        return "no se registro administrador";
    }
    
    public boolean verificarAdministrador(String user, String passwd){       
        Admin admin= daoAdmin.verificarAdministrador(user, passwd);
        if(admin==null) return false;
        return true;
    }
    
}
